package com.zhyz.bookstore.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Orders {
    private User user;//用户
    private String ordernum;//订单号
    private int quantity;//商品总数
    private double money;//商品总金额
    private String time;//订单创建时间
    private int status;//订单状态

    private List<OrderItems> items = new ArrayList<OrderItems>();// 订单项

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(String ordernum) {
        this.ordernum = ordernum;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }


    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<OrderItems> getItems() {
        return items;
    }

    public void setItems(List<OrderItems> items) {
        this.items = items;
    }

    public Orders() {
    }

    public Orders(User user, String ordernum, int quantity, double money, String time, int status, List<OrderItems> items) {
        this.user = user;
        this.ordernum = ordernum;
        this.quantity = quantity;
        this.money = money;
        this.time = time;
        this.status = status;
        this.items = items;
    }

    @Override
    public String toString() {
        return "Orders{" +
                "user=" + user +
                ", ordernum='" + ordernum + '\'' +
                ", quantity=" + quantity +
                ", money=" + money +
                ", time='" + time + '\'' +
                ", status=" + status +
                ", items=" + items +
                '}';
    }
}
